//
//  ZMYTabBar.h
//  XMJJ_zml
//
//  Created by 杨何华 on 2025/5/9.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
@class ZMYTabBar;

@protocol ZMYTabBarDelegate <NSObject>

- (void)ZMYTabBar:(ZMYTabBar *)tabBar didSelectTabAtIndex:(NSInteger)index;

@end

@interface ZMYTabBar : UIView

@property (nonatomic, weak) id<ZMYTabBarDelegate> delegate;
@property (nonatomic, strong) NSArray<NSString *> *tabTitles;
@property (nonatomic, assign) NSInteger selectedIndex;
@property (nonatomic, strong) UIColor *normalTextColor;
@property (nonatomic, strong) UIColor *selectedTextColor;
@property (nonatomic, strong) UIColor *underlineColor;
@property (nonatomic, assign) CGFloat underlineHeight;
@property (nonatomic, strong) UIFont *normalFont;
@property (nonatomic, strong) UIFont *selectedFont;

- (instancetype)initWithFrame:(CGRect)frame titles:(NSArray<NSString *> *)titles;
- (void)selectTabAtIndex:(NSInteger)index animated:(BOOL)animated;

@end

NS_ASSUME_NONNULL_END
